package com.wing.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.user.model.entity.Role;
import com.wing.web.excel.RoleExcelIn;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author
 */
@Mapper
public interface RoleDao extends BaseMapper<Role> {

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     * @return
     */
    List<Role> list4app(@Param("page") Page<Role> page, @Param("params") Map<String, Object> params);

    /**
     * 通过ids查询角色岗位数据
     *
     * @param ids
     * @return
     */
    List<Role> getRoleData(@Param("ids") List<Long> ids);

    List<RoleExcelIn> exportList(Map paramsMap);

    /**
     * 递归查询
     */
    List<Role> getRoleHierarchy(Long roleId);

    Role getRoleDepartData(@Param("dingParentId") Long dingParentId,@Param("dingDepartmentId") Long dingDepartmentId);

    List<Role> getDingDepartData();

}
